﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ec_System.Models.Web
{
    public partial class ItemOrderData
    {
        public Int32 ID { get; set; }
        public Int32 ShippingType { get; set; }
        public Int32 OrderStatus { get; set; }
        public Int32 TransferMark { get; set; }
        public String PaymentType { get; set; }
        public System.DateTime TransferTime { get; set; }
        public System.DateTime InDate { get; set; }
        public System.DateTime LastEditDate { get; set; }
        public System.Decimal TotalMoney { get; set; }
        public System.Decimal FactMoney { get; set; }
        public System.Decimal Discount { get; set; }
        public System.Decimal ReturnMoney { get; set; }
        public String OrderId { get; set; }
        public String LoginId { get; set; }
        public String VendorNumber { get; set; }
        public String ShipUser { get; set; }
        public String TransferUser { get; set; }
        public String LastEditUser { get; set; }

        public string Address { get; set; }
    }
    public partial class ItemOrderData
    {
        public String OrderDetailId { get; set; }
        public String ItemNumber { get; set; }
        public String QRCode { get; set; }
        public String Unit { get; set; }
        public int Count { get; set; }
        public int ReturnMark { get; set; }
        public Decimal UnitPrice { get; set; }
        public int ProductID { get; set; }
        public int IsEvaluation { get; set; }
        public String ImageUrl { get; set; }
        public String ShopProductTitle { get; set; }
        public String SecondTitle { get; set; }

        public string ShowOrderStatus
        {
            get
            {
                switch (this.OrderStatus)
                {
                    case 1: return "已受理出库";
                    case 2: return "等待收货";
                    case 3: return "已完成";
                    default:
                        return "";
                }
            }
        }
        public decimal ShowDiscount
        {
            get
            {
                return this.TotalMoney - FactMoney;
            }
        }
        public string ShowReturnMark
        {
            get
            {
                switch (this.ReturnMark)
                {
                    case 0: return "正常";
                    case 1: return "正在处理 ";
                    case 2: return "已退货";
                    case 3: return "拒绝退货";
                    default:
                        return "";
                }
            }
        }
        public List<ItemOrderDetailsData> ItemDatailsList = new List<ItemOrderDetailsData>();
        public List<ItemOrderData> OrderList = new List<ItemOrderData>();
    }

    /// <summary>
    /// 仅供请求查询使用
    /// </summary>
    public class ItemOrderRequestData : RequestBase
    {
        public string StartDate { get; set; }
        public string StartEnd { get; set; }
        public string OrderID { get; set; }
        public string loginID { get; set; }
    }

    /// <summary>
    /// 用于Response订单分页
    /// </summary>
    public class ItemOrderResponseData : ResponseBase<List<ItemOrderData>>
    {
    }
}
